home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 119
/
FreelogNo119-MarsAvril2014.iso
/
Securite
/
Malwarebytes Anti-Malware
/
mbam-setup-1.75.0.1300.exe
/
{app}
/
Chameleon
/
chameleon.chm
/
js
/
getchmpath.js
next >
Wrap
Text File
|
2012-03-03
|
569b
|
25 lines
// http://helpware.net/FAR/far_faq.htm#Script_to_External_File
function GetChmPath() {
var X, Y, a, ra, dir;
ra = /::/;
a = location.href.search(ra);
if (a <= 0) return "";
//find the index of the first colon in the string
X = 0;
ra = /:/;
a = location.href.search(ra);
if (a == 2) X = 14; //prefix = mk:@MSITStore:
else
if (a > 2) X = a+1; //prefix = ms-its: OR prefix = its:
Y = location.href.lastIndexOf( "\\" );
dir = location.href.substring(X, Y);
return unescape(dir) + "\\";
}